#ifndef STATISTICS_HPP
#define STATISTICS_HPP
#include <pthread.h>
#include <vector>

class statistics{
private:
    static pthread_mutex_t mtx_1;
    static statistics * instance_1;
    statistics(){
        for(int i=16;i<=30;++i){
            tempSta.push_back(make_pair(i,0));
        }
        windSta.push_back(make_pair(1,0));
        windSta.push_back(make_pair(1,0));
        windSta.push_back(make_pair(3,0));
    }
    ~statistics(){
    }

public:
    static statistics* getInstance(){
        if(instance_1==nullptr){
            pthread_mutex_lock(&mtx_1);
            if(instance_1==nullptr){
                instance_1 = new statistics();
            }
            pthread_mutex_unlock(&mtx_1);
        }
        return instance_1;
    }
    int switchTime;
    int achieveTempTime;
    int scheduleTime;
    vector<pair<int,int> > tempSta;
    vector<pair<int,int> > windSta;
};


#endif // STATISTICS_HPP
